#ifndef _WIFICONFIG_H_
#define _WIFICONFIG_H_
/*h files*/
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include "FS.h"
#include "arduino.h"
/*erros*/
#define ERRO_1  "erro1" /**/
#define ERRO_2  "erro2" /**/
#define ERRO_3  "erro3" /**/

#define DEBUG_ON 0

#define config_file_name "/config.txt"
#define html_file_name   "/index.html"

#define DNS_PORT   53            //默认DNS设置端口为53
#define AP_NAME    "ESP8266_MQTT"     //设置默认热点名称
#define Reconnect_Time 5
/*var for use*/
extern String wifiname;
extern String wifipass;
extern String ip;
extern String port;
extern String username;
extern String userpass;
extern uint8_t MAC_array_STA[6];
extern char loop_wifi_config;
/*privite functions*/
void read_info(void);
void save_info(void);

char web_server(void);
void web_page(void);
void callBack_page(void);
/*API for wifi*/
extern "C" int setWifi(void);
extern "C" int WiFiInit(void);


#endif
